# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=mcman
pkgver=0.4.3
pkgrel=0
pkgdesc="Powerful Minecraft Server Manager CLI"
url="https://github.com/ParadigmMC/mcman"
arch="all !s390x !riscv64 !ppc64le" # builds fail due to ring (dependency), see issues 986, 1612 and 1630 respectively at https://github.com/briansmith/ring
license="GPL-3.0-only"
makedepends="
	cargo
	cargo-auditable
"
subpackages="$pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/ParadigmMC/mcman/archive/refs/tags/$pkgver.tar.gz
"
options="!check" # no tests

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -Dm 755 target/release/mcman "$pkgdir"/usr/bin/mcman

	install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}

sha512sums="
2a68c2c489449a41e1ec00b965c628f0f453561aac9478c9ebc1ec27014b95944046401ee92e6c4f59b83c02c28ebf49b77b364856c9bb4f794b63f26371bd7a  mcman-0.4.3.tar.gz
"
